home *** CD-ROM | disk | FTP | other *** search
/ By Popular Request 2.0 / By Popular Request 2.0 (Arsenal Computer).ISO / amiga_5 / stdhnd12.lha / StdIO-Handler / Install next >
Text File  |  1995-01-17  |  2KB  |  89 lines

  1. ;
  2. ; $PROJECT: StdIO-Device
  3. ;
  4. ; $VER: Install 1.1 (17.01.95)
  5. ;
  6. ; by
  7. ;
  8. ; Stefan Ruppert , Windthorststra▀e 5 , 65439 Fl÷rsheim , GERMANY
  9. ;
  10. ; (C) Copyright 1995
  11. ; All Rights Reserved !
  12. ;
  13. ; $HISTORY:
  14. ;
  15. ; 17.01.95 : 001.001 : initial
  16. ;
  17.  
  18. (set #handler      (cat "StdIO-Handler"))
  19.  
  20. (set mode
  21.      (askchoice
  22.          (prompt @app-name)
  23.          (help @askchoice-help)
  24.          (choices "Install" "Remove")
  25.      )
  26. )
  27.  
  28. (if mode
  29.         (set pmode "Remove")
  30.         (set pmode "Install")
  31. )
  32.  
  33. ; get handlers dir
  34. (set handlersdir
  35.         (askdir
  36.                 (prompt "Where do the Handlers belong")
  37.                 (help @askdir-help)
  38.                 (default "L:")
  39.         )
  40. )
  41.  
  42. ; now do install or remove
  43. (if mode
  44.         ; Remove
  45.         (
  46.                 ; Show what we are doing
  47.                 (working "Removing " @app-name)
  48.  
  49.                 ; Remove the non-standard pieces
  50.                 (delete (tackon handlersdir  #handler))
  51.                 (trap 4 (delete "devs:DOSDrivers/STDIO" (infos)))
  52.                 (trap 4 (delete "Storage:DOSDrivers/STDIO" (infos)))
  53.  
  54.                 ; Don't want to use the confusing "Installation Complete" message
  55.                 ; when what we really did was remove things...
  56.                 (message "The \"" @app-name "\" components "
  57.                          "that you specified have been successfully removed")
  58.                 (exit (quiet))
  59.         )
  60.  
  61.         ; Install
  62.         (
  63.                 (working "Installing " @app-name)
  64.  
  65.                 ; Install the handler
  66.                 (copylib
  67.                         (prompt (cat "Copying " @app-name))
  68.                         (help @copylib-help)
  69.                         (source #handler)
  70.                         (dest handlersdir)
  71.                         (confirm)
  72.                 )
  73.  
  74.                 ; Install the descriptors
  75.                 (copyfiles
  76.                         (prompt "Copying the DOSDriver description")
  77.                         (help @copyfiles-help)
  78.                         (source "STDIO")
  79.                         (dest "DEVS:DOSDrivers/")
  80.                         (infos)
  81.                         (confirm)
  82.                 )
  83.  
  84.         )
  85. )
  86.  
  87. (set @default-dest handlersdir)
  88.  
  89.